package com.xxmw.transaction.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 交易基础对信息枚举
 * @author luowenliang
 * @since 2020/2/20 09:47
 */
@Getter
@AllArgsConstructor
public enum BitforexSymbolEnum {

    CTCUSDT("100", "",8, 8),
    CTCETH("100", "",8, 8);

    /**
     * 下单最小数量(btc)
     */
    private String minOrderNum;

    /**
     * 下单最小总金额(usdt)
     */
    private String minOrderValue;

    /**
     * 数量(btc)精度
     */
    private int numScale;

    /**
     * 单价(usdt)精度
     */
    private int priceScale;

    public static BitforexSymbolEnum getBySymbol (String symbol) {
        for (BitforexSymbolEnum value : BitforexSymbolEnum.values()) {
            if (value.name().equalsIgnoreCase(symbol)) {
                return value;
            }
        }
        return null;
    }
}
